import java.util.Arrays;

public class Test {
   /* public static void main(String[] args) {*/
       /* int[] array = {24,5,8,9,0,6,7};
        *//*Arrays.sort(array);*//*
     *//*   System.out.println(Arrays.toString(array));*//*
        int index = Arrays.binarySearch(array,8);
        System.out.println(index);*/

   /* }*/
    /*public static void bubbleSort(int[] array){
        //比较趟数
        for(int i = 0; i < array.length-1; i++){
            boolean flg = false;
            for(int j = 0; j < array.length-1;j++){
                if(array[j] > array[j+1]){
                    int tmp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tmp;
                    flg = true;
                }
            }
            if(flg == false){
                break;
            }
        }
    }*/
   /*public static void main(String[] args) {
       int[] array = {1,2,3,4,5};
       reverse(array);
       System.out.println(Arrays.toString(array));
   }*/

   /*public static void reverse(int[] array){
       int i = 0;
       int j = array.length - 1;
       while(i < j){
           int tmp = array[i];
           array[i] = array[j];
           array[j] = tmp;
           i++;
           j--;
       }
   }*/

    public static void main(String[] args) {
        /*int[][] array = new int[2][];
        array[0] = new int[2];
        array[1] = new int[4];
        System.out.println(array.length);
        System.out.println(array[1].length);
    }*/
        /*int[][] array = {{1,2,3},{4,5,6}};*/
       /* for(int i = 0; i < array.length; i++){
            for(int j = 0; j < array[i].length;j++){
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }*/

       /* for(int[] tmp : array){
            for(int x: tmp){
                System.out.print(x + " ");
            }
            System.out.println();
        }*/
       /* String ret = Arrays.deepToString(array);
        System.out.println(ret);*/
       /* int[] array = {1,2,3,4,5};*/
      /*  int[] ret = Arrays.copyOf(array,array.length*2);*/
        /*int[] ret = Arrays.copyOfRange(array,1,3);*/
       /* int[] copy = new int[array.length];
        System.arraycopy(array,0,copy,0,array.length);
        System.out.println(Arrays.toString(copy));*/
        /*int[] ret = copy(array);
        System.out.println(Arrays.toString(array));*/
   /* }*/

    /*public static int[] copy(int[] array){
        int[] copyArray = new int[array.length];
        for(int i = 0; i < array.length; i++){
            copyArray[i] = array[i];
        }
        return copyArray;

     */
        int[] array = {1,2,3,4};
        Arrays.fill(array,0,3,8);
        System.out.println(Arrays.toString(array));
    }

}
   /* public static void main1(String[] args) {
      *//*  int[] array = null;
        System.out.println(array.length);*//*

        *//*int[] array = {1,2,3};
        int[] array2 = array;
        array2[2] = 8;
         String ret1 = Arrays.toString(array);
         String ret2 = Arrays.toString(array2);
        System.out.println(ret1);
        System.out.println(ret2);*//*
    }
*/
   /* public static void main2(String[] args) {
        int[] array = {1,2,3,4};
        System.out.println("before: " + Arrays.toString(array));
        func1(array);
        System.out.println("behind: " + Arrays.toString(array));
    }*/

   /* public static void func1(int[] array){
        array = new int[]{3,5,6,7};
    }*/

   /* public static void main3(String[] args) {
        int[] array = {1,2,3,4};
        String ret = myToString (array);
        System.out.println(ret);
    }*/

  /*  public static String myToString(int[] array){
        if(array==null){
            return null;
        }
        String ret = "[";
        for(int i = 0; i < array.length; i++){
            ret += array[i];
            if(i != array.length-1){
                ret += ",";
            }
        }
        ret += "]";
        return ret;
    }*/

   /* public static void main4(String[] args) {
        int[] array = {1,2,3,4,5,6,7};
        int key = 5;
        int ret = find(array,7);
        System.out.println(ret);
    }*/

   /* public static int find(int[] array, int key){
        for(int i = 0; i < array.length; i++){
            if(array[i] == key){
                return i;
            }
        }
        return -1;
    }*/





